import { createRouter, createWebHistory } from 'vue-router'
import CreateView from '@/views/CreateView.vue'
import HomeView from '@/views/HomeView.vue'
import ModelView from '@/views/ModelView.vue'
import CommunityView from '@/views/CommunityView.vue'
import ProjectView from '@/views/ProjectView.vue'

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    name: 'Home',
    component: HomeView
  },
  {
    path: '/data',
    name: 'Data',
    component: CreateView
  },
  {
    path: '/model',
    name: 'Model',
    component: ModelView
  },
  {
    path: '/community',
    name: 'Community',
    component: CommunityView
  },
  {
    path: '/projects',
    name: 'Projects',
    component: ProjectView
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router